package cn.itsource.ymjs.controller;

import cn.itsource.ymjs.entity.SystemItem;
import cn.itsource.ymjs.query.CourseQuery;
import cn.itsource.ymjs.result.JSONResult;
import cn.itsource.ymjs.web.controller.BaseController;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import cn.itsource.ymjs.service.ISystemService;

import java.util.List;

@RestController
@RequestMapping("/dictionary")
@Api
public class SystemController  extends BaseController<SystemItem, CourseQuery> {

    @Autowired
    private ISystemService iSystemService;

    @GetMapping("/grade")
    private JSONResult getAllGrades() {
        List<SystemItem> list = iSystemService.getAllGrades();
        return JSONResult.success(list);
    }
}
